package com.lagou.service.impl;


import com.lagou.service.HelloService;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;

@Service
public class HelloServiceImpl implements HelloService {

    @Override
    public String sayHello(String name) {
        String remoteAddr = RpcContext.getContext().getAttachment("remoteAddr");
        System.out.println("HelloService:" + remoteAddr);
        return "hello:" + name;
    }

}